package com.cd.service.news;

import java.util.List;

import com.cd.bean.News;
import com.cd.bean.SearchCondition;


/**
 *新闻动态接口
 *@Author zhk
 *@Date 2017-12-19
 **/
public interface NewsService {
	
	/**
	 * 新增
	 * @param news
	 * @throws Exception
	 */
	public void save(News news) throws Exception;
	/**
	 * 通过id删除
	 * @param id
	 * @throws Exception
	 */
	public void delete(Integer id) throws Exception;
	/**
	 * 更新
	 * @param news
	 * @throws Exception
	 */
	public void edit(News news) throws Exception;
	/**
	 * 查询列表（全部）
	 * @return list
	 * @throws Exception
	 */
	public List<News> listAll() throws Exception;
	/**
	 * 通过id获取
	 * @param id
	 * @return news
	 * @throws Exception
	 */
	public News findById(Integer id) throws Exception;
	/**
	 * 批量删除
	 * @param id
	 * @throws Exception
	 */
	public void deleteAll() throws Exception;
	/**
	 * 返回记录总数
	 * @return int
	 * @throws Exception
	 */
	public Integer size() throws Exception;
	/**
	 * 返回有限集合（4）
	 * @return
	 * @throws Exception
	 */
	public List<News> listLimit() throws Exception;
	
	/**
	 * 批量删除
	 * @param array
	 * @return
	 */
	public Integer deleteBatch(Integer[] array);
	
	
}
